<script setup lang="ts">

import {onActivated, onDeactivated, ref} from "vue";

const count=ref(0);

onActivated(()=>{
  console.log('Tab1组件被活过来了');
});

onDeactivated(()=>{
  console.log('Tab1组件死去');
});


</script>

<template>
    <button @click="count++">计数</button>
    <div>点击数量 {{count}}</div>

</template>

<style scoped>

</style>